package com.ruoyi.system.api.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author wangenhao
 * @className WarehouseGoodsDTO
 * @description 仓库商品分页dto
 * @date 2024-10-26 上午11:45
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WarehouseGoodsDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    // 商品名称
    private String proName;

    // 商品编码
    private String proCode;

    // 仓库id
    private Integer houseId;

    // 商品id
    private Integer goodsId;

    //仓库编码
    private String houseCode;

    //仓库名称
    private String houseName;

    //是否按商品分组
    private Boolean isGroupByGoods;

    /**
     * 请求参数
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    /**
     * 搜索值
     */
    @JsonIgnore
    private String searchValue;

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }
}
